<html>
<head>
  <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1">
  <title>Contents.m</title>
<link rel="stylesheet" type="text/css" href="../stpr.css">
</head>
<body>
<table  border=0 width="100%" cellpadding=0 cellspacing=0><tr valign="baseline">
<td valign="baseline" class="function"><b class="function">KFD</b>
<td valign="baseline" align="right" class="function"><a href="../kernels/index.html" target="mdsdir"><img border = 0 src="../up.gif"></a></table>
  <p><b>Kernel Fisher Discriminat.</b></p>
  <hr>
<div class='code'><code>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Synopsis:</span></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;kfd(&nbsp;data&nbsp;)</span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;kfd(&nbsp;data,&nbsp;options&nbsp;)</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Description:</span></span><br>
<span class=help>&nbsp;&nbsp;This&nbsp;function&nbsp;is&nbsp;an&nbsp;implementation&nbsp;of&nbsp;the&nbsp;Kernel&nbsp;Fisher</span><br>
<span class=help>&nbsp;&nbsp;Discriminant&nbsp;(KFD)&nbsp;[<a href="../references.html#Mika99a" title = "" >Mika99a</a>].&nbsp;The&nbsp;aim&nbsp;is&nbsp;to&nbsp;find&nbsp;a&nbsp;binary&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;kernel&nbsp;classifier&nbsp;which&nbsp;is&nbsp;the&nbsp;linear&nbsp;decision&nbsp;function&nbsp;in&nbsp;a&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;feature&nbsp;space&nbsp;induced&nbsp;by&nbsp;the&nbsp;selected&nbsp;kernel&nbsp;function.&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;The&nbsp;bias&nbsp;is&nbsp;found&nbsp;decision&nbsp;function&nbsp;is&nbsp;trainined&nbsp;by&nbsp;the&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;linear&nbsp;SVM&nbsp;on&nbsp;the&nbsp;data&nbsp;projected&nbsp;on&nbsp;the&nbsp;optimal&nbsp;direction.</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Input:</span></span><br>
<span class=help>&nbsp;&nbsp;data&nbsp;[struct]&nbsp;Training&nbsp;binary&nbsp;labeled&nbsp;data:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.X&nbsp;[dim&nbsp;x&nbsp;num_data]&nbsp;Vectors.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.y&nbsp;[1&nbsp;x&nbsp;num_data]&nbsp;Labels&nbsp;(1&nbsp;or&nbsp;2).</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;options&nbsp;[struct]&nbsp;Control&nbsp;parameters:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.ker&nbsp;[string]&nbsp;Kernel&nbsp;identifier&nbsp;(default&nbsp;'linear').&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See&nbsp;'help&nbsp;kernel'&nbsp;for&nbsp;more&nbsp;info.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.arg&nbsp;[1&nbsp;x&nbsp;nargs]&nbsp;Kernel&nbsp;argument(s).</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.C&nbsp;[1x1]&nbsp;Regularization&nbsp;constant&nbsp;of&nbsp;the&nbsp;linear&nbsp;1-D&nbsp;SVM&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;used&nbsp;to&nbsp;optimize&nbsp;the&nbsp;bias&nbsp;(default&nbsp;C=inf).</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.mu&nbsp;[1x1]&nbsp;Regularization&nbsp;constant&nbsp;added&nbsp;to&nbsp;the&nbsp;diagonal&nbsp;of&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;within&nbsp;scatter&nbsp;matrix&nbsp;(default&nbsp;1e-4).</span><br>
<span class=help>&nbsp;</span><br>
<span class=help>&nbsp;<span class=help_field>Output:</span></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;[struct]&nbsp;Binary&nbsp;SVM&nbsp;classifier:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.Alpha&nbsp;[num_data&nbsp;x&nbsp;1]&nbsp;Weight&nbsp;vector.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.b&nbsp;[1x1]&nbsp;Bias&nbsp;of&nbsp;decision&nbsp;function.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.sv.X&nbsp;[dim&nbsp;x&nbsp;num_data]&nbsp;Training&nbsp;data&nbsp;(support&nbsp;vectors).</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.trnerr&nbsp;[1x1]&nbsp;Training&nbsp;classification&nbsp;error.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.kercnt&nbsp;[1x1]&nbsp;Number&nbsp;of&nbsp;kernel&nbsp;evaluations&nbsp;used&nbsp;during&nbsp;training.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.nsv&nbsp;[1x1]&nbsp;Number&nbsp;of&nbsp;support&nbsp;vectors.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.options&nbsp;[struct]&nbsp;Copy&nbsp;of&nbsp;options.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.cputime&nbsp;[1x1]&nbsp;Used&nbsp;cputime.</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Example:</span></span><br>
<span class=help>&nbsp;&nbsp;trn&nbsp;=&nbsp;load('riply_trn');</span><br>
<span class=help>&nbsp;&nbsp;options&nbsp;=&nbsp;struct('ker','rbf','arg',1,'C',10,'mu',0.001);</span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;kfd(trn,&nbsp;options)</span><br>
<span class=help>&nbsp;&nbsp;figure;&nbsp;ppatterns(trn);&nbsp;psvm(model);</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=also_field>See also </span><span class=also></span><br>
<span class=help><span class=also>&nbsp;&nbsp;<a href = "../svm/svmclass.html" target="mdsbody">SVMCLASS</a>,&nbsp;<a href = "../linear/fisher/fld.html" target="mdsbody">FLD</a>,&nbsp;SVM.</span><br>
<span class=help></span><br>
</code></div>
  <hr>
  <b>Source:</b> <a href= "../kernels/list/kfd.html">kfd.m</a>
  <p><b class="info_field">Modifications: </b> <br>
 17-may-2004, VF<br>
 14-may-2004, VF<br>
 7-july-2003, VF<br>

</body>
</html>
